Skip to content

Type owl:deprecated as xsd:boolean — clears ~4000 ROBOT report findings#467

Merged
turbomam merged 1 commit into
mainfrom
fix-deprecated-boolean-typing
Jun 2, 2026
Merged

Type owl:deprecated as xsd:boolean — clears ~4000 ROBOT report findings#467
turbomam merged 1 commit into
mainfrom
fix-deprecated-boolean-typing

Conversation

@turbomam

@turbomam turbomam commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Low-hanging, high-impact release-quality fix found while running the default-profile ROBOT report.

Problem. src/templates/deprecated.tsv used A owl:deprecated, emitting an untyped literal <owl:deprecated>true</owl:deprecated> instead of "true"^^xsd:boolean. ROBOT/OWL API therefore did not recognize the 1217 deprecated terms as deprecated, cascading into the default-profile report:

rule before after
deprecated_boolean_datatype (ERROR) 1216 0
misused_obsolete_label (ERROR) 1216 0
duplicate_label (ERROR) 438 0
missing_definition (WARN) 1395 179
total 4342 256

Fix. A owl:deprecated -> AT owl:deprecated^^xsd:boolean. owl:deprecated now serializes as "true"^^xsd:boolean; the deprecated terms are recognized, so the three ERROR categories clear and missing_definition drops to live-term-only (179, the #377 work). deprecated.tsv is the hand-maintained source template, so this is a one-cell change; release artifacts rebuilt.

Remaining report items (not in scope here): duplicate_exact_synonym (70), missing_superclass (4 INFO), duplicate_label_synonym (3) — worth a separate look.

Note: METPO's custom QC profile already passed (it masks these), so CI was green before; this fixes the underlying defect so the default/OBO-dashboard profile is clean too. Leaving open for CI + Copilot review.

…BOT findings)

deprecated.tsv used the directive `A owl:deprecated`, which emits an untyped
plain literal: <owl:deprecated>true</owl:deprecated>. OWL expects a typed
boolean, so ROBOT (and OWL API) did not recognize the 1217 deprecated terms as
actually deprecated. That cascaded into the default ROBOT report:

  deprecated_boolean_datatype  1216 ERROR
  misused_obsolete_label       1216 ERROR  (obsolete-labeled but "not deprecated")
  duplicate_label               438 ERROR  (deprecated terms not excluded)
  missing_definition           1395 WARN   (deprecated terms not excluded)

Changed the directive to `AT owl:deprecated^^xsd:boolean`. owl:deprecated now
serializes as "true"^^xsd:boolean, the terms are recognized as deprecated, and
the default-profile report drops from 4342 to 256 findings: the three ERROR
categories go to 0 and missing_definition falls to 179 (live terms only, the
#377 work). Remaining: duplicate_exact_synonym (70, separate) + a few minor.

deprecated.tsv is the hand-maintained source template (not generated), so this
is a one-cell source fix; rebuilt all release artifacts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 16:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes how deprecations are emitted from the hand-maintained deprecated.tsv ROBOT template by ensuring owl:deprecated is produced as a properly typed xsd:boolean literal, which allows ROBOT/OWLAPI to recognize deprecated entities and clears thousands of default-profile report findings.

Changes:

  • Update the deprecated.tsv template header from an untyped A owl:deprecated annotation to a typed AT owl:deprecated^^xsd:boolean.
  • Ensure all true values in the deprecated column serialize as "true"^^xsd:boolean, allowing downstream QC rules to treat the 1,217 terms as deprecated.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

turbomam added a commit that referenced this pull request Jun 2, 2026
…rent vs target IRI config; reword #467 status)

- identifier-scheme.md: write the full -full product IRI (no ellipsis); add a
  'current state' note that the repo ships URIBASE=https://w3id.org (the 404 main
  IRI) and that aligning to the target is tracked in #465.
- deprecation-workflow.md: reword 'Fixed in #467' to reflect that #467 is the fix
  (not yet landed on this branch) and to keep the directive typed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@turbomam turbomam merged commit e292e42 into main Jun 2, 2026
9 checks passed
@turbomam turbomam deleted the fix-deprecated-boolean-typing branch June 2, 2026 16:59
turbomam added a commit that referenced this pull request Jun 2, 2026
…:deprecated note) (#469)

* docs: add synonym + identifier-scheme guidelines; note typed owl:deprecated

Durable contributor guidelines (conventions, not todos) capturing decisions made
during release prep:

- docs/synonym-conventions.md — the two kinds of synonym column (ontology-native
  exact/related vs source-bound), the reified `>AI IAO:0000119` source-provenance
  pattern, and the rules: keep source values verbatim, source-bound duplicates
  across classes are intentional (cross-system value mapping, do not de-dup),
  exact synonyms should be near-unique (overload tracked in #444).
- docs/identifier-scheme.md — canonical w3id IRIs, the `https://w3id.org/metpo/`
  resolvable base (nothing above it resolves), no obolibrary PURLs, resolution
  behavior, and where the IRI values are configured (odk.yaml, not the generated
  Makefile; ODK/w3id mismatch tracked in #465).
- docs/deprecation-workflow.md — corrected the deprecated.tsv directive example to
  the typed `AT owl:deprecated^^xsd:boolean` and explained why (the #467 fix).

Docs only; no ontology or code changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: address Copilot review on #469 (spell out product IRI; flag current vs target IRI config; reword #467 status)

- identifier-scheme.md: write the full -full product IRI (no ellipsis); add a
  'current state' note that the repo ships URIBASE=https://w3id.org (the 404 main
  IRI) and that aligning to the target is tracked in #465.
- deprecation-workflow.md: reword 'Fixed in #467' to reflect that #467 is the fix
  (not yet landed on this branch) and to keep the directive typed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
turbomam added a commit that referenced this pull request Jun 2, 2026
#473, #479) (#480)

* QC content fixes + nest extreme/restrictive preference phenotypes (#470 #471 #472 #473 #479)

Consolidates all the Sheet-content QC fixes into one rebuild on top of the typed
owl:deprecated fix (#467), because they all regenerate the same artifacts from the
single Google Sheet and cannot be independent PRs. Supersedes #477 and #478.

Content (all via the Sheet, SoT):
- #470 labels alkaphilic -> alkaliphilic (METPO:1003002/1003004/1003005)
- #471 NaCl delta high: range_min=8 (matches the >= 8 formula)
- #472 Fermentation reparented respiration -> metabolism + def reworded
- #473 + #479 nest genuine subset phenotypes under their base class (truth over
  flat-partition), genus reworded to "a <base> phenotype in which ...":
    extreme hyperthermophilic -> hyperthermophilic
    extremely/moderately/slightly halophilic -> halophilic
    obligately acidophilic -> acidophilic; obligately alkaliphilic -> alkaliphilic
    obligately anaerobic -> anaerobic; obligately aerobic -> aerobic

The nested defs use genus "a <base> phenotype" (e.g. "a halophilic phenotype"),
which the DEF-FORM check flags (genus != exact parent label) — intentional debt.
Halophily threshold numbers (#474) are a separate decision and unchanged here.

Fixes #470, #471, #472, #473, #479.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* lint: DEF-FORM accepts '<parent> phenotype' genus (the endorsed nesting form)

The nested phenotypes (#473/#479) use genus 'a <base> phenotype in which ...'
(e.g. 'a halophilic phenotype', parent 'halophilic'). That is hierarchy/label/
definition compatible but tripped DEF-FORM (genus != exact parent label). Accept
'<parent>', '<parent> phenotype', '<parent> preference', '<parent> quality' as
valid genus forms for adjectival parents. Regenerated baselines accordingly. The
test/assay genus mismatches (#461) and other true mismatches still fire.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* style: ruff format the lint test/check edits

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(content): use O₂ subscript in obligately anaerobic/aerobic defs (Copilot #480)

Consistency with the other oxygen-preference definitions. Addresses the Copilot
review comment on #480.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* style(content): normalize all definitions/synonyms to plain ASCII (consistency + simplicity)

Replaces special Unicode in ontology content with ASCII for searchability and
robustness: O2 (was O₂), >= (was ≥), 'C' (was °C), '-' (was en/em dash), and
the em dash in METPO:2000068's def -> ';'. Covers 14 class defs, one
literature-mining synonym, and one property def. All edits made in the Google
Sheet (SoT) via gog; both TSVs are now 0 non-ASCII. Resolves Copilot's O2/O₂
consistency note (#480) in the ASCII direction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
turbomam added a commit that referenced this pull request Jul 8, 2026
… diff targets, https URL

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
turbomam added a commit that referenced this pull request Jul 9, 2026
…nics in CLAUDE.md (#566)

* Document ROBOT default-profile QC, source-DB scope, release-diff workflow, and BioPortal pull mechanics

Add operational mechanics to CLAUDE.md that were only tribal knowledge: the
custom ROBOT report profile masks findings the default profile catches (run the
default for true dashboard state); METPO harmonizes exactly four source-bound
DBs and must not name NMDC/BugSigDB in scope text; the diff targets and the
squeaky-clean -> prepare_release -> release_diff pre-PR workflow; and BioPortal's
nightly pull (releases propagate in ~24h; query ?display=all to see pull config).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Address Copilot review: PR-not-issue #467, cd src/ontology, host-only diff targets, https URL

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Address second Copilot round: precise xsd:boolean phrasing, canonical pullLocation URL

Reword to 'give owl:deprecated a typed xsd:boolean value rather than an untyped
string literal' (the datatype types the value, not the predicate); use the
canonical raw GitHub main URL for pullLocation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants